package chapter19.HandlerStream;

import org.junit.jupiter.api.Test;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @Auther: Tx
 * @Date: 2022/7/23 22:53
 */
public class BufferedWriter1 {
    @Test
    void test01() throws IOException {
        String filePath = "e://BufferedWriter.txt";
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(filePath));
        bufferedWriter.write("好好学习，天天向上");
        bufferedWriter.newLine();
        bufferedWriter.write("努力努力在努力");
        bufferedWriter.close();
    }
}
